<?php


namespace App\Models\Admin;


class AdminListField extends Base
{
    protected $table = 'admin_list_field';
    protected $guarded = [];
    public $timestamps = false;

    public static function getListField($type):array
    {
        $info = self::where('type',$type)->orderBy('id','DESC')->first();
        if (empty($info->fields)) return [];
        $fields = json_decode($info->fields,true);
        return $fields;
    }
}
